<?php

namespace App\Http\Controllers\api\Reservation;

use App\Http\Controllers\Controller;
use App\Logic\reservation\ZvousCor;
use App\Models\Order;
use App\Models\Patient;
use App\Server\ApiService;
use Facade\FlareClient\Api;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Matrix\Exception;

class RendeZvousController extends Controller
{
    /**
     * @小程序当前用户预约数据展示
     * @user wsg
     * @method get
     * @url http://www.healthcare.com/api/zvous/reserv_ation_show
     * @data
     * @return \Illuminate\Http\Response
     */
    public function reservAtionShow()
    {
        try {
            $userId = 11;
            $res = ZvousCor::fistShow($userId);
            if ($res){
                return ApiService::success('展示数据成功',$res );
            }
            return  ApiService::fail('展示失败');
        }catch (Exception $exception){
            Log::info($exception->getMessage());
        }
    }
    /**
     * @小程序当前用户订单展示
     * @user wsg
     * @method get
     * @url http://www.healthcare.com/api/zvous/order_show
     * @data
     * @return \Illuminate\Http\Response
     */
    public function orderShow()
    {
        try {
            $userId = 11;
            $res = ZvousCor::orderShowDate($userId);
            if ($res){
                return ApiService::success('展示成功',$res);
            }
            return ApiService::fail('展示订单数据失败');
        }catch (Exception $exception){
            Log::info($exception->getMessage());
        }

    }
    /**
     * @小程序当前已完成的状态
     * @user wsg
     * @method get
     * @url http://www.healthcare.com/api/zvous/order_show
     * @data
     * @return \Illuminate\Http\Response
     */
    public function aliRefund()
    {
        try {
            $userId = 11;
            $res = ZvousCor::stocksDate($userId);
            if ($res){
                return ApiService::success('展示成功',$res);
            }
            return ApiService::fail('展示订单数据失败');
        }catch (Exception $exception){
            Log::info($exception->getMessage());
        }
    }
}
